package ai.restosuite.infrastructure;

import java.util.List;

/**
 * @author yuhao.wang3
 * @since 2020/3/27 16:21
 */
public class DingtalkMessage {

    private String msg_type;
    private Card card = new Card();

    public String getMsg_type() {
        return msg_type;
    }

    public void setMsg_type(String msg_type) {
        this.msg_type = msg_type;
    }

    public Card getCard() {
        return card;
    }

    public void setCard(Card card) {
        this.card = card;
    }


    public DingtalkMessage(String msg_type, Card card) {
        this.msg_type = msg_type;
        this.card = card;
    }

    public DingtalkMessage() {
    }

    public static class Text {
        /**
         * content : test
         */

        private String content;

        private String tag;

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getTag() {
            return tag;
        }

        public void setTag(String tag) {
            this.tag = tag;
        }

        public Text() {
        }

        public Text(String content, String tag) {
            this.content = content;
            this.tag = tag;
        }
    }

    public static class At {
        /**
         * isAtAll : false
         */

        private boolean isAtAll = false;

        public boolean isIsAtAll() {
            return isAtAll;
        }
    }

    public static class Card {

        private Header header;

        private List<Element> elements;

        public Header getHeader() {
            return header;
        }

        public void setHeader(Header header) {
            this.header = header;
        }

        public List<Element> getElements() {
            return elements;
        }

        public void setElements(List<Element> elements) {
            this.elements = elements;
        }

        public Card(Header header, List<Element> elements) {
            this.header = header;
            this.elements = elements;
        }

        public Card() {
        }
    }

    public static class Element {

        private Text text;

        private String tag;

        public Text getText() {
            return text;
        }

        public void setText(Text text) {
            this.text = text;
        }

        public String getTag() {
            return tag;
        }

        public void setTag(String tag) {
            this.tag = tag;
        }

        public Element(Text text, String tag) {
            this.text = text;
            this.tag = tag;
        }
        public Element() {
        }
    }

    public static class Header {

        private Text title;

        public Text getTitle() {
            return title;
        }

        public void setTitle(Text title) {
            this.title = title;
        }

        public Header(Text title) {
            this.title = title;
        }

        public Header() {
        }
    }
}
